package com.kellycheung.chicken_go_go;

import com.kellycheung.chicken_go_go.BaseObject.GOAnchor;

public class GameTitle extends GameScene {
	protected static final int I_EXTRA_CNT = 1;
	
	public GameTitle( GameEngine p_geMain , String[] p_sParm ) {
		super( p_geMain , GameTitle.I_EXTRA_CNT , p_sParm );
		
		ClickableObj bgIndex = new ClickableObj( this , 0 , GOAnchor.Right , this.geMain.gcScreenSize.fX , this.geMain.gcScreenSize.fY/2f );
		bgIndex.gssAllowStatus = GameSceneStatus.all;
		bgIndex.addAnimation( new int[]{ R.drawable.bg_index } , 0 );
		bgIndex.setBtnReleaseAct( new ButtonFunction() {
			@Override
			public String[] call() throws Exception {
				// TODO Auto-generated method stub
				goToNextPage();
				
				return null;
			}
		});
        this.addSceneObj( bgIndex );
        this.addClickableObj( bgIndex );
        this.iLoadCnt++;
        
        this.gssStatus = GameSceneStatus.all;
        this.gssStatusNormal = GameSceneStatus.all;
	}
	
	public void goToNextPage() {
		synchronized ( this.geMain.shMain ) {
			this.geMain.addToNextScene( new GameHome( this.geMain , null ) );
		}
	}
}
